#!user/bin/env python3
# -- coding: utf-8 --
# @Createtime：2022/5/30
# @Updatetime：9:37
# @Author：Test008
# @File：all.py
# @Description：test
from baseconfig.config import Url
from selenium import webdriver
from selenium.webdriver.common.service import Service
from selenium.webdriver.common.by import By

gushiwen = Url.url_gushiwen
import os

driver_path = os.path.join(os.path.dirname(__file__), '../driver')
s1 = Service(driver_path + '/chromedriver.exe')
class LoginPageEles:
    # 基础封装
    def __init__(self, path=gushiwen):
        self.driver = webdriver.Chrome(service=s1)
        self.driver.maximize_window()
        self.driver.get(path)

    def my_button_box(self):
        return self.driver.find_element(By.XPATH, '/html/body/div[1]/div/div[2]/div[1]/a[6]').click()

if __name__ == '__main__':
    obj = LoginPageEles()
    obj.my_button_box()
